<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3d旋转</title>
    <style>
        .box{
            width: 500px;
            height: 500px;
            border: 5px solid gray;
            transform-style: preserve-3d;
            margin: auto;
            display: flex;
        }
        .center{
            width: 200px;
            height: 200px;
            background: red;
            margin: auto;
            /* transform: rotateY(50deg); */
            transform: rotate3d(1, 1, 1, 50deg);
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="center"></div>
    </div>
</body>
</html>